#!/bin/bash
while true
do
tomcat=`netstat -an | grep ":4001" | awk '$1 == "tcp" && $NF == "LISTEN" {print $0}' | wc -l`
if [ $tomcat -eq 0 ];then
echo "守护进程未检测到Volta服务，正在启动服务...."
./Volta
fi
sleep 10
done
